#!/bin/bash
[ -f /etc/init.d/functions ] && . /etc/init.d/functions
for n in `cat /home/xujun/wang.txt`
do
    curl -o /dev/null  -s --connect-timeout 2 $n
    if [ $? -eq 0 ];then
       action "网站是正常的" /bin/true
    else
       action "网站是宕机的" /bin/flase
    fi
done